<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 *
CREATE TABLE  `test`.`test_normal` (
 `object_id` INT NOT NULL AUTO_INCREMENT ,
 `name` VARCHAR( 255 ) NOT NULL ,
 `created` INT NOT NULL ,
PRIMARY KEY (  `object_id` )
) ENGINE = INNODB COMMENT =  'pdo normal';
 *
 *
 *
10:08:22 LD@kinghost:/home/http/naa/test/letterGenerate$ time php pdo-normal.php
DONE
real	1m10.419s
user	0m2.843s
sys	0m0.937s

 */

$dsn = 'mysql:dbname=test;host=localhost';
$user = 'root';
$password = 'shadow';

$pdo = new PDO($dsn, $user, $password);

for($i=0; $i<100000; $i++){
    $data = array('name'=>'我其实是个演员， 你说你信不信？！ 你还别不信， 他二大爷就是我师傅，真的，偶骗人从不打草稿的。',
        'created'=>time());
    $sql = 'insert into `test`.`test_normal`(`name`, `created`) values('
            . $pdo->quote($data['name'])
            .' , '.$pdo->quote($data['created']).' )';
    $pdo->exec($sql);

}
echo "DONE";








?>
